Skip to main content

All Questions

0votes
0answers
62views

Web application having database with OPC client

I'm designing a browser-based application that will display real-time data collected from OPC server. I have decided to use Angular framework for the browser application development. The browser ...
Kamrul A's user avatar
2votes
4answers
3kviews

I wrote a class with "init" method. Should I call it from other class methods? Or leave it to the object user? (Code Design)

I have a java class with an init method. It's different from the constructor. The constructor just initializes the variables/fields. The init method connects to a database and performs some ...
joker's user avatar
23votes
6answers
6kviews

How important is it to clearly understand requirements and architecture before starting to code? [closed]

Whenever possible I have been requiring an understanding of the requirements and architecture for the next scope of work before starting to code. Sometimes due to schedule pressure on larger projects ...
Bill Dyer's user avatar
-1votes
5answers
693views

Proving program correctness under all possible cases

There are techniques of proving program correctness under all possible cases, but that is a more advanced topic, for a later subject in your curriculum. I always had this doubt: Is it possible to ...
Dennis's user avatar
0votes
2answers
2kviews

Store static data in public folder as json file or directly in .js file?

I'm busy working on a website – somewhat new to this – and I don't quite know where I should store static data: in the public folder as a separate json file, or within the .js file as an object. In ...
AlePouroullis's user avatar
2votes
2answers
584views

Design of a modular application

I'm developing an application (Java) in a modular architecture. I have two approaches in mind and I'm not sure which one will be "better code" in case of maintenance and conventions. I have ...
SmallDevice's user avatar
-1votes
3answers
700views

Improving APIs that call 3rd party APIs [closed]

So I'm designing the backend of a platform that often calls other 3rd party APIs. The issues I've noticed were latency issues (sometimes the calls were fast, others a bit slow >15s) and I'm ...
Fares's user avatar
3votes
4answers
780views

Is it a bad practice to have an interface method to tell whether it can handle an object?

interface Resolver { boolean canResolve(SomeInput input); SomeOutput resolve(SomeInput input); } public static void main(String[] args) { List<Resolver> resolvers = ...; ...
Martin Tarjányi's user avatar
-1votes
1answer
241views

How to avoid cyclic dependency in UI application

I'm developing an UI application where I ran into an issue with a cyclic dependency. Here is the simplified code, to explain the problem. #include <list> class UiStyle; UiStyle* CreateStyle(); ...
mooko's user avatar
1vote
4answers
171views

How to design a program that would definitely use microservices in production, but which I want to demo on a virtual machine for my portfolio?

So I am an independent software developer and I'm building up my portfolio in the hopes of helping with job applications. I have a broad design for a web based "app" (not really like a phone ...
Ellie Lockhart's user avatar
20votes
8answers
22kviews

Is an empty 'while' loop bad practice?

Consider the following: public boolean maybeUpdateTime() { if (this.timeReference.isAfter(lastInterval.getBeginning()) { this.timeReference = lastInterval.getEnd(); lastInterval = ...
Lucas Noetzold's user avatar
0votes
3answers
202views

When using a DSL to structure my application, should I favor coupling the code with the DSL, or trying to have majority of my code independent of it?

We're currently using the Apache Camel Java DSL to structure our application, but I guess this question can mostly apply to any DSL in general. Now, amongst our developers, we are divided on two polar ...
random_software_dev's user avatar
0votes
1answer
386views

What is the most common stateless way for authentication in microservices?

I'm trying to get into Microservices by creating a project, so far I've stumbled upon authentication mechanisms, in a monolithic architecture, the client (web app) would send a request with the user ...
Muizz Mahdy's user avatar
0votes
4answers
183views

Prevent developer errors / debugging help

How much should I factor in potential future developer error when writing code? This works better with a few examples: switch(something) case 1: return good; case 2: return fine; case 3: return ...
Zuldaan's user avatar
0votes
3answers
167views

Use the type returned by a function as information

Over time I become used to use the type of the returned value of a function as a piece of additional information. For example: A function that is supposed to return or an array if the arguments are ...
DT1's user avatar
  • 209

153050per page
close